package com.gxa.hotel.admin.controller;

import com.google.gson.JsonObject;
import com.gxa.hotel.admin.service.HotelService;
import com.gxa.hotel.admin.service.RoomStateService;
import com.gxa.hotel.core.common.JsonResult;
import com.gxa.hotel.core.pojo.domain.Hotel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@Api
@RequestMapping("/hotel")
public class HotelController {
   @Autowired
    HotelService hotelService;

    @PostMapping("/detail")
    @ApiOperation("查询酒店详情")
    public Map selectDetail(){
        Hotel hotel = hotelService.selectDetail();

        JsonResult jsonResult=new JsonResult();
        jsonResult.setCode("1");
        jsonResult.setData(hotel);

        return jsonResult.getMap();
    }


}
